import { getProxyPath } from '../config/proxyPath'
import { createRequest } from '../utils/request'
import { cDatamerge, addparam } from './addParam'
const baseURL = getProxyPath('apiWorkCZR')
const request = createRequest({ baseURL })

/**
 * 业务相关-陈
 */
/**获取菜单列表 */
export function getSysMenuTree(data) {
  data = cDatamerge(data)
  return request.postJson('/sysMenuApi/getByRoleCode', data)
}
/**
 * 用户信息维护
 */
/**列表 */
export function editUser_getPage(data) {
  data = addparam(data)
  return request.postJson('/sysViewUserApi/getAllUserByPage', data)
}
/**用户信息维护列表 */
export function editUser_getMaintainPage(data) {
  data = addparam(data)
  return request.postJson('/sysViewUserApi/userInfoMaintain', data)
}
/**获取详情 */
export function editUser_getById(data) {
  data = addparam(data)
  return request.postJson('/sysViewUserApi/getById', data)
}
/**新增 */
export function editUser_insert(data) {
  data = addparam(data)
  return request.postJson('/sysViewUserApi/insert', data)
}
/**编辑 */
export function editUser_update(data) {
  data = addparam(data)
  return request.postJson('/sysViewUserApi/update', data)
}
/**删除 */
export function editUser_delete(data) {
  data = addparam(data)
  return request.postJson('/sysViewUserApi/delete', data)
}
/**
 * 企业信息维护
 */
/**列表 */
export function editOrganize_getPage(data) {
  data = addparam(data)
  return request.postJson('/sysViewOrganizeApi/getSysOrganizeTreeByPage', data)
}
/**公司信息维护列表 */
export function editOrganize_getMaintainPage(data) {
  data = addparam(data)
  return request.postJson('/sysViewUserApi/organizeInfoMaintain', data)
}
/**获取详情 */
export function editOrganize_getById(data) {
  data = addparam(data)
  return request.postJson('/sysViewOrganizeApi/getById', data)
}
/**新增 */
export function editOrganize_insert(data) {
  data = addparam(data)
  return request.postJson('/sysViewOrganizeApi/insert', data)
}
/**编辑 */
export function editOrganize_update(data) {
  data = addparam(data)
  return request.postJson('/sysViewOrganizeApi/update', data)
}
/**删除 */
export function editOrganize_delete(data) {
  data = addparam(data)
  return request.postJson('/sysViewOrganizeApi/delete', data)
}

/**用户注销 */
export function user_relieve(data) {
  data = addparam(data)
  return request.postJson('/sysUserApi/relieve', data)
}
